import { setColumnsRender } from '@/utils/common'
import { ParamManager } from '@longnows/lib'
export const useBodyTables = () => {
  const pm = ParamManager.getInstance()
  const renderMap = new Map<string, ColumnRender>([['dclUnit', ({ text }) => pm.getName('UNIT', text)]])
  const afterGetColumns = (columns: Recordable[]): Recordable[] => {
    setColumnsRender(columns, renderMap)
    return columns
  }
  return {
    afterGetColumns,
  }
}
